﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SinglePage.aspx.cs" Inherits="Web.Admin.Page.SinglePage" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>

<!DOCTYPE html>

<%="<!--[if IE 8]> <html class=\"ie8 no-js\"> <![endif]-->"%>
<%="<!--[if IE 9]> <html class=\"ie9 no-js\"> <![endif]-->"%>
<%="<!--[if !IE]><!-->"%>
<html>
<%="<!--<![endif]-->"%>
    <!-- BEGIN HEAD -->

    <head>
        <meta charset="utf-8" />
        <title><%=Evan.Common.CommFun.GetAppSetting("AdminTitle") %> - 后台管理系统</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1" name="viewport" />
        <!-- #include file="../include/com_res_css.inc" -->
    </head>
    <!-- END HEAD -->

    <body class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
        <!-- BEGIN HEADER -->
        
        <!-- #include file="../include/top_bar.inc" -->

        <!-- END HEADER -->
        <!-- BEGIN HEADER & CONTENT DIVIDER -->
        <div class="clearfix"> </div>
        <!-- END HEADER & CONTENT DIVIDER -->
        <!-- BEGIN CONTAINER -->
        <div class="page-container">
            <!-- BEGIN SIDEBAR -->
            
            <!-- #include file="../include/left_menu.inc" -->
            
            <!-- END SIDEBAR -->
            <!-- BEGIN CONTENT -->
            <div class="page-content-wrapper">
                <!-- BEGIN CONTENT BODY -->
                <div class="page-content">
                    <!-- BEGIN PAGE HEADER-->
                    <!-- BEGIN THEME PANEL -->
                    <!-- #include file="../include/theme_panel.inc" -->
                    <div style="clear:both;"></div>
                    <div style="float:left;">
                        <a href="../Page_Channel/Edit.aspx?action=editChannel&t=Channel&id=<%=ClassId %>"><h3 class="page-title"> <%=CurChannel.Title %></h3></a>
                    </div>
                    <div class="btn-group btn-group-solid page-control" style="float:left;margin: 23px 30px;">
                        <%if (CurChannel.IsVisualEdit==1) { %>
                        <a  class="btn btn-sm default" href="<%=CurChannel.WebPath %>?vedit=true" target="_blank" ><i class="fa fa-edit"></i>&nbsp;&nbsp;可视化编辑</a>
                        <%} %>

                        <% if (GlobalConfigModel.Dev)
                        { %>
                        <a style="margin-left: 10px;" class="btn btn-sm default" href="/admin/Page_Field/List.aspx?t=Fields&classid=<%=ClassId %>" target="_blank"><i class="fa fa-file-text-o"></i>&nbsp;&nbsp;&nbsp;<span>字段管理</span></a>
                        <%} %>

                        <% if (SiteConfig.WebMode==2) { %>
                            <% if (CurChannel.IsCreatePage==1) { %>
                            <a class="btn btn-sm default" href="../Page_System/CreateStaticPages.aspx?classid=<%=ClassId %>"><i class="fa fa-file-code-o"></i>&nbsp;&nbsp;<span>生成静态页</span></a>
                            <% } %>
                        <% } %>
                    </div>
                    <div style="clear:both;"></div>
                    <!-- END PAGE TITLE-->
                    <!-- END PAGE HEADER-->
                    <!-- BEGIN PAGE CONTENT-->

                                    <div class="portlet light bordered">
                                        <div class="portlet-title tabbable-line">

                                            <ul class="nav nav-tabs ">
                                                <li class="active">
                                                    <a href="#tab_1" data-toggle="tab" aria-expanded="true"> 基本信息 </a>
                                                </li>
                                                <% if (CurChannel.IsSeo == 1 || Evan_BLL.GetCurChannelHasRelease(CurChannel))
                                                    { %>

                                                <li class="">
                                                    <a href="#tab_2" data-toggle="tab" aria-expanded="false">SEO信息 </a>
                                                </li>
                                                <%} %>
                                            </ul>
                                        
                                            <div class="caption">
                                                <i class="glyphicon glyphicon-list-alt font-red"></i>
                                                <span class="caption-subject font-red bold uppercase">内容管理</span>
                                            </div>

                                        </div>

                                        <div class="tab-content">

                                            <div class="tab-pane active" id="tab_1">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <div class="form-body">

                                                        
                                                            <% foreach (Evan.Model.SysModel.HtmlHelperModel item in Html_List)
                                                               {
                                                                   Response.Write(Evan.Common.HtmlHelper.HtmlBuild(item));
                                                               }
                                                            %>

                                                                
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                             <div class="tab-pane" id="tab_2">
                                                <div class="form">
                                                    <div class="form-horizontal form-row-seperated">
                                                        <div class="form-body">
                                                                <%
                                                                    Evan.Model.SysModel.HtmlHelperModel SeoTitle = new Evan.Model.SysModel.HtmlHelperModel { Title = "SEO标题", PlaceHoder = "请输入Seo标题", Notice = "栏目SEO标题", FieldName = "SeoTitle", FieldVerify = "", MaxLength = 50, FieldType = "input" };
                                                                    Evan.Model.SysModel.HtmlHelperModel SeoKeyWords = new Evan.Model.SysModel.HtmlHelperModel { Title = "SEO关键字", PlaceHoder = "请输入SEO关键字", Notice = "栏目SEO关键字", FieldName = "SeoKeyWords", FieldVerify = "", MaxLength = 150, FieldType = "input" };
                                                                    Evan.Model.SysModel.HtmlHelperModel SeoDescription = new Evan.Model.SysModel.HtmlHelperModel { Title = "SEO描述", PlaceHoder = "请输入SEO描述", Notice = "栏目SEO描述", FieldName = "SeoDescription", FieldVerify = "", MaxLength = 300, FieldType = "textarea" };

                                                                    Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SeoTitle));
                                                                    Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SeoKeyWords));
                                                                    Response.Write(Evan.Common.HtmlHelper.HtmlBuild(SeoDescription));
                                                                %>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>


                                        <div class="form-actions form-submit-row">
                                            <div class="form-group">
                                                <label class="control-label col-md-2"></label>
                                                <div class="col-md-6">
                                                    <% if(Evan.Member.Administrator.HasRole(1, ClassId.ToString(), "", "update")){ %>
                                                    <button type="button" class="btn green submit"><i class="fa fa-check"></i> 提交</button>
                                                    <%} %>
                                                </div>
                                            </div>  

                                            <%--侧边保存按钮--%>
                                            <% if (Html_List.Count>0) { %>
                                            <div style="position:fixed;z-index:10001; bottom:148px; right:20px; ">
                                                <% if(Evan.Member.Administrator.HasRole(1, ClassId.ToString(), "", "update")){ %>
                                                        <button type="button" class="btn green submit btn_submit_vertical"><i class="fa fa-check"></i><br/>提<br/>交</button><br/>
                                                <%} %>
                                            </div>
                                            <% } %>

                                            <div class="clear"></div>
                                        </div>

                                    </div>

                    
                    <!-- END PAGE CONTENT-->
                </div>
                <!-- END CONTENT BODY -->
            </div>
            <!-- END CONTENT -->
            
        </div>
        <!-- END CONTAINER -->
        <!-- #include file="../include/footer.inc" -->
   <!-- #include file="../include/com_res_js.inc" -->
    <!-- feditor文件 -->
    <link rel="stylesheet" href="../assets/feditor/css/loadfeditor.css"  />
    <script type="text/javascript" src="../assets/feditor/js/loadfeditor.js"></script>
     <script  type="text/javascript">
         var model = <%=(Evan.Model.ConvertModel.ConvertToJson(Model))%>;
         SetModel(model);
         model.ClassId=GetQs("classid");
    </script>
    </body>
  
</html>
